import React, { Component } from 'react'
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
const Parent = React.lazy(() => import('../src/pages/Parent'))
const Child = React.lazy(() => import('../src/pages/Child'))
const Function = React.lazy(() => import('../src/pages/Function'))
export default class App extends Component {
  render() {
    return (
   
        <BrowserRouter>
          <Routes>
            <Route path='/' element={<Navigate to='/parent'></Navigate >}></Route>
            <Route path='/parent' element={<Parent></Parent>}>
              <Route path='child/:code' element={<Child></Child>}>
              </Route>
              <Route path='function' element={<Function></Function>}>
              </Route>
            </Route>
          </Routes>
        </BrowserRouter>
    )
  }
}

